package com.red.wood.module.questionnaire.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.red.wood.module.questionnaire.dao.QuestionnaireDao;
import com.red.wood.module.questionnaire.service.QuestionnaireService;

@Service
public class QuestionnaireServiceImpl implements QuestionnaireService{

	@Autowired
	private QuestionnaireDao dao;
	
	@Override
	public Map<String, Object> getPageData(Map<String, Object> param) {
		return dao.getPageData(param);
	}
	
	@Override
	public Map<String, Object> getPageDataSt(Map<String, Object> param) {
		return dao.getPageDataSt(param);
	}
	
	@Override
	public void questionnaireOper(List<Map<String, Object>> list) {
		dao.questionnaireOper(list);
	}

	@Override
	public boolean questionnaireOperCheck(String companyName, String tradeName) {
		boolean flag = false;
		List<Map<String,Object>> list = dao.questionnaireOperCheck(companyName, tradeName);
		if(list != null && list.size() > 0) {
			flag = true;
		}
		return flag;
	}
}
